don't skip the "build platforms" job even when there are no platforms to build #283
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When there are no platforms to build for the platform cache, it conceptually makes sense to skip the platform building job matrix. But skipping a job in the middle of the graph like this causes some grief downstream: we needed to start doing things like
if: always() && needs.Build.result == 'success'
for dependent jobs because the defaultsuccess()
rule didn't like to see an ancestor skipped.But this
if: always()
hack comes with a nasty side effect: it's impossible to cancel the workflow. Apparently a job withif: always()
is not cancellable. This is particularly annoying when something like NP Tests fail and you have to wait until LR Tests finish before you can retry the workflow.So instead, the Build Platforms job will now inject a dummy entry in to its matrix when there are no platforms to build. This allows the job to still pass when it has no work to do and all dependent jobs don't need the
if: always()
hack. Thus making the workflow cancellable.At some point, the discover & build jobs should be bundled in to a reusable workflow to encapsulate away some of the gory details.